//Tue 19 Jan 2010 10:16:50 AM CST 
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>

using namespace std;

class Inequalities
{
public:
	int maximumSubset(vector<string> inequalities)
	{
		int ret = 0;
		sort(inequalities.begin(), inequalities.end());
		int count = 0;
		do
		{
			for(int i=0; i<inequalities.size(); i++)
				cout << inequalities[i] << endl;
			count = 0;
			double mmin = -0.1;
			double mmax = 1000.1;
			for(int i=0; i<inequalities.size(); i++)
			{
				string x;
				string s;
				int number;
				stringstream ss(inequalities[i]);
				ss >> x >> s >> number;
				double num = number;
				cout << x << ", " << s << ", " << num << endl;
				if(s == "<")
					mmax = min(mmax, num-0.1);
				else if(s == "<=")
					mmax = min(mmax, num);
				else if(s == "=")
				{
					if(mmax < num || mmin > num) break;
					else
					{
						mmax = num;
						mmin = num;
					}
				}
				else if(s == ">=")
					mmin = max(mmin, num);
				else if(s == ">")
					mmin = max(mmin, num+0.1);
				if(mmax >= mmin)
					count ++;
				else
					break;
				cout << mmin << ", " << mmax << endl;
			}
			
			if(ret < count)
			{
				ret = count;
//				cout << ret << endl;
			}
//			ret = max(ret, count);
//			cout << ret << endl;
		}while(next_permutation(inequalities.begin(), inequalities.end()));
		return ret;
	}
};
